package com.hundsun.cprs.yyt.service.goods.dao;

import com.hundsun.cprs.yyt.service.goods.domain.GoodsSpecs;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodsSpecsDao {
    int deleteByPrimaryKey(Long id);

    int insert(GoodsSpecs record);

    GoodsSpecs selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(GoodsSpecs record);

    List<GoodsSpecs> selectGoodsSpecsList(GoodsSpecs record);
    
    int addAllocatedStock(@Param("id") Long id,@Param("amount") Integer amount,@Param("frozenStock") Integer frozenStock);
    
    int addAllocatedStockWithFrozen(@Param("id") Long id,@Param("amount") Integer amount);
    
    int reduceFrozenStock(@Param("id") Long id,@Param("amount") Integer amount);
    
    int deductGoodsStock(@Param("id") Long id, @Param("amount") Integer amount, @Param("goodsStock") Integer goodsStock);
    
    int updateGoodsStock(@Param("id") Long id,@Param("amount") int amount);
    
    int updateFrozenStock(@Param("id") Long id,@Param("amount") int amount);

    List<Long> selectSkuIdListByGoodsCode(String goodsCode);
}